<!DOCTYPE html>
<!-- saved from url=(0031)http://www.open-open.com/jsoup/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>jsoup开发指南,jsoup中文使用手册,jsoup中文文档</title>

<meta name="keywords" content="jsoup开发指南,jsoup中文使用手册,jsoup中文文档,jsoup java html解析器">
<meta name="description" content="jsoup Cookbook中文版 - 由http://www.open-open.com翻译整理"><link rel="stylesheet" type="text/css" href="./jsoup_files/style.css">

</head><body class="n1-cookbook" ryt13050="1" style="">
<div class="wrap">
<div class="header">
<div class="nav-sections">
<ul>
  <li class="n1-home">
  <h4><a href="http://jsoup.org/">jsoup</a></h4></li>
  <li class="n1-news"><a href="http://jsoup.org/news/">新闻</a></li>
  <li class="n1-bugs"><a href="http://jsoup.org/bugs">bugs</a></li>
  <li class="n1-discussion"><a href="http://jsoup.org/discussion">讨论</a></li>
  <li class="n1-download"><a href="http://jsoup.org/download">下载</a></li>
  <li class="n1-api"><a href="http://jsoup.org/apidocs/">api参考</a></li>
  <li class="n1-cookbook"><a href="http://jsoup.org/cookbook/">Cookbook</a></li></ul>
</div></div>
<div class="breadcrumb"><a href="http://jsoup.org/">jsoup</a> <span class="seperator">»</span> cookbook </div>
<div class="content">
<div class="col1">
<h1>jsoup Cookbook(中文版)</h1>
<div class="toc">
<h3>入门</h3>
<ol start="1">
  <li><a href="http://www.open-open.com/jsoup/parsing-a-document.htm">解析和遍历一个html文档</a></li>
</ol>
<h3>输入</h3>
<ol start="2">
  <li><a href="http://www.open-open.com/jsoup/parse-document-from-string.htm">解析一个html字符串</a></li>
  <li><a href="http://www.open-open.com/jsoup/parse-body-fragment.htm">解析一个body片断</a></li>
  <li><a href="http://www.open-open.com/jsoup/load-document-from-url.htm">根据一个url加载Document对象</a></li>
  <li><a href="http://www.open-open.com/jsoup/load-document-from-file.htm">根据一个文件加载Document对象</a></li>
</ol>
<h3>数据抽取</h3>
<ol start="6">
  <li><a href="http://www.open-open.com/jsoup/dom-navigation.htm">使用dom方法来遍历一个Document对象</a></li>
  <li><a href="http://www.open-open.com/jsoup/selector-syntax.htm">使用选择器语法来查找元素</a></li>
  <li><a href="http://www.open-open.com/jsoup/attributes-text-html.htm">从元素集合抽取属性、文本和html内容</a></li>
  <li><a href="http://www.open-open.com/jsoup/working-with-urls.htm">URL处理</a></li>
  <li><a href="http://www.open-open.com/jsoup/example-list-links.htm">程序示例：获取所有链接</a></li>
</ol>
<h3>数据修改</h3>
<ol start="11">
  <li><a href="http://www.open-open.com/jsoup/set-attributes.htm">设置属性值</a></li>
  <li><a href="http://www.open-open.com/jsoup/set-html.htm">设置元素的html内容</a></li>
  <li><a href="http://www.open-open.com/jsoup/set-text.htm">设置元素的文本内容</a></li>
</ol>
<h3> html清理</h3>
<ol start="14">
  <li><a href="http://www.open-open.com/jsoup/whitelist-sanitizer.htm">消除不受信任的html (来防止xss攻击)</a></li>
</ol><script src="./jsoup_files/ca-pub-7963911354665843.js"></script><script type="text/javascript"><!--
google_ad_client = "pub-7963911354665843";
/* 728x90, 创建于 11-1-27 */
google_ad_slot = "5890482646";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="./jsoup_files/show_ads.js">
</script><ins id="aswift_0_expand" style="display:inline-table;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px;background-color:transparent"><ins id="aswift_0_anchor" style="display:block;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px;background-color:transparent"><iframe width="728" height="90" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe></ins></ins></div></div>
<div class="col2"></div></div>
<div class="footer"><b>jsoup</b> html parser: copyright © 2009 - 2011 <a href="http://www.open-open.com/" rel="me"><b>jonathan hedley</b></a> </div></div>

</body></html>